Skip to content

fix: wire SSR route components - #728

Merged
kang-heewon merged 1 commit into
trunkfrom
fix-694-ssr-route-components
Jun 14, 2026
Merged

fix: wire SSR route components#728
kang-heewon merged 1 commit into
trunkfrom
fix-694-ssr-route-components

Conversation

@kang-heewon

Copy link
Copy Markdown
Member

Summary

create-croco-app SSR route templates now pass the generated page component value into defineRoute(), so container-fullstack and ssr-lambda apps no longer emit route definitions backed by undefined casts or type-only runtime references.

Fixes #694

변경 사항

  • Import the generated page component as a value in both SSR route templates and assign it directly to component.
  • Keep route object type validation with satisfies PageRouteDefinition before calling defineRoute().
  • Export the existing CrocoDataFn type from @croco/frontend-react so the SSR Lambda fixture typechecks through the public package entrypoint.
  • Add template and public type regressions plus patch changesets for create-croco-app and @croco/frontend-react.

Verification

  • pnpm --filter create-croco-app exec vitest run src/tests/templates-build.spec.ts
  • pnpm --filter create-croco-app test (7 files, 30 tests)
  • pnpm --filter create-croco-app typecheck
  • pnpm --filter create-croco-app build
  • TypeScript compiler API route smoke for both SSR route files, both Page components, and ssr-lambda pageData.ts
  • pnpm --filter @croco/frontend-react test (2 files, 5 tests)
  • pnpm --filter @croco/frontend-react typecheck
  • pnpm --filter @croco/frontend-react build
  • pnpm check
  • git diff --check origin/trunk..HEAD
  • pnpm exec changeset status --since origin/trunk
  • pre-push: auto-changeset, full pnpm test (195 tasks), full pnpm typecheck (194 tasks)

Self-review

  • Correctness/regression: [create-croco-app] SSR 라우트 템플릿이 컴포넌트 값을 잘못 연결함 #694 acceptance is covered by template assertions that reject type-only default imports, component: undefined, and the old Page satisfies Page runtime pattern; the route smoke typechecks both templates with the generated Page value and pageData.ts.
  • API/security/compatibility/release: CrocoDataFn is an additive public type export for a type already defined in @croco/frontend-react; no runtime dependencies, lockfile entries, environment assumptions, or secrets changed. Patch changesets cover both publishable packages.
  • Maintainability/minimality: the runtime/template diff is limited to the two affected route files and one existing public type barrel; tests are focused on the regression and no new abstraction or unrelated cleanup was introduced.

Risk

Low. The route templates now reference the existing generated component value directly; the only public API surface change is an additive type export used by the existing SSR template fixture.

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@kang-heewon, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 25 minutes and 35 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7816bba3-61e1-4505-b0b2-043662907102

📥 Commits

Reviewing files that changed from the base of the PR and between 5f07310 and ff057ce.

📒 Files selected for processing (6)
  • .changeset/create-croco-app-ssr-route-components.md
  • packages/create-croco-app/src/tests/templates-build.spec.ts
  • packages/create-croco-app/templates/container-fullstack/apps/console-web/pages/route.ts
  • packages/create-croco-app/templates/ssr-lambda/apps/console-web/pages/route.ts
  • packages/frontend-react/src/index.ts
  • packages/frontend-react/src/tests/public-types.spec.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-694-ssr-route-components

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

📊 Benchmark Results

❌ Some benchmarks failed

Benchmark p75 Threshold Baseline vs Baseline Status
CrocoApp benchmarks 3.2μs - - - ⚠️
EventBusConfig.start (10 handlers) 1.5μs - 9.0μs -83.6%
EventPublisher.publishNow single event 1.7μs - - - ⚠️
DefaultHandlerResolver.resolve × 10 0.1μs - 0.2μs -60.0%
Container.get singleton (cold) 1.0μs - 0.5μs +90.2%
Container.register × 50 components 10.5μs - 8.0μs +31.5%
Container.validate (50 components) 28.2μs - 25.0μs +12.8%
Container.get singleton (warm) 0.4μs - 0.3μs +27.0%
TelemetryRuntime benchmarks 1.9μs - 2.0μs -2.9%

Updated: 2026-06-14T17:22:36.446Z · Commit: 317ff07

@kang-heewon
kang-heewon merged commit 3d92b2e into trunk Jun 14, 2026
7 of 8 checks passed
@kang-heewon
kang-heewon deleted the fix-694-ssr-route-components branch June 14, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[create-croco-app] SSR 라우트 템플릿이 컴포넌트 값을 잘못 연결함

1 participant